package net.bolue.sysmng.tblbean;

import java.util.Iterator;
import java.util.Map;
import java.util.Set;

/**
 * 引用字典
 * @author Administrator
 *
 */
public class RefDicRes extends TableBean{
	
	/**
	 * 子系统
	 */
	private String subSys;
	
	/**
	 * 字典子类型
	 */
	private Integer dicSubKind;
	
	/**
	 * 子类型描述
	 */
	private String subKindDesc;
	
	/**
	 * 数据表名
	 */
	private String tblName;
	
	/**
	 * 字典标识列名
	 */
	private String dicIdCol;
	
	/**
	 * 字典标识列类型
	 */
	private Integer dicIdColType;
	
	/**
	 * 字典描述列名
	 */
	private String dicDescCol;
	
	/**
	 * 显示附加条件
	 */
	private String dispAppendCnd;
	
	/**
	 * 选择附加条件
	 */
	private String selAppendCnd;
	
	/**
	 * 默认显示类型
	 */
	private Integer dispType;
	
	/**
	 * 下拉框描述方式
	 */
	private Integer ddDescType;
	
	/**
	 * 弹出字典URL
	 */
	private String popDicUrl;
	
	/**
	 * 备注
	 */
	private String remark;
	
	public String getSubSys() {
		return subSys;
	}

	public void setSubSys(String subSys) {
		this.subSys = subSys;
	}

	public Integer getDicSubKind() {
		return dicSubKind;
	}

	public void setDicSubKind(Integer dicSubKind) {
		this.dicSubKind = dicSubKind;
	}

	public String getSubKindDesc() {
		return subKindDesc;
	}

	public void setSubKindDesc(String subKindDesc) {
		this.subKindDesc = subKindDesc;
	}

	public String getTblName() {
		return tblName;
	}

	public void setTblName(String tblName) {
		this.tblName = tblName;
	}

	public String getDicIdCol() {
		return dicIdCol;
	}

	public void setDicIdCol(String dicIdCol) {
		this.dicIdCol = dicIdCol;
	}

	public Integer getDicIdColType() {
		return dicIdColType;
	}

	public void setDicIdColType(Integer dicIdColType) {
		this.dicIdColType = dicIdColType;
	}

	public String getDicDescCol() {
		return dicDescCol;
	}

	public void setDicDescCol(String dicDescCol) {
		this.dicDescCol = dicDescCol;
	}

	public String getDispAppendCnd() {
		return dispAppendCnd;
	}

	public void setDispAppendCnd(String dispAppendCnd) {
		this.dispAppendCnd = dispAppendCnd;
	}

	public String getSelAppendCnd() {
		return selAppendCnd;
	}

	public void setSelAppendCnd(String selAppendCnd) {
		this.selAppendCnd = selAppendCnd;
	}

	public Integer getDispType() {
		return dispType;
	}

	public void setDispType(Integer dispType) {
		this.dispType = dispType;
	}

	public Integer getDdDescType() {
		return ddDescType;
	}

	public void setDdDescType(Integer ddDescType) {
		this.ddDescType = ddDescType;
	}

	public String getPopDicUrl() {
		return popDicUrl;
	}

	public void setPopDicUrl(String popDicUrl) {
		this.popDicUrl = popDicUrl;
	}

	public String getRemark() {
		return remark;
	}

	public void setRemark(String remark) {
		this.remark = remark;
	}

	@Override
	public TableBean mapToEntry(Map<String, Object> map) {
		RefDicRes refDicRes = new RefDicRes();
		Set<String> keySet = map.keySet();
		Iterator<String> keyIt = keySet.iterator();
		while(keyIt.hasNext()){
			String key = keyIt.next();
			Object o = map.get(key);
			if("SUBSYS".equals(key)){
				refDicRes.setSubSys((String)o);
			} else if("DICSUBKIND".equals(key)){
				refDicRes.setDicSubKind((Integer)o);
			} else if("SUBKINDDESC".equals(key)){
				refDicRes.setSubKindDesc((String)o);
			} else if("TBLNAME".equals(key)){
				refDicRes.setTblName((String)o);
			} else if("DICIDCOL".equals(key)){
				refDicRes.setDicIdCol((String)o);
			} else if("DICIDCOLTYPE".equals(key)){
				refDicRes.setDicIdColType((Integer)o);
			} else if("DICDESCCOL".equals(key)){
				refDicRes.setDicDescCol((String)o);
			} else if("DISPAPPENDCND".equals(key)){
				refDicRes.setDispAppendCnd((String)o);
			} else if("SELAPPENDCND".equals(key)){
				refDicRes.setSelAppendCnd((String)o);
			} else if("DISPTYPE".equals(key)){
				refDicRes.setDispType((Integer)o);
			} else if("DDDESCTYPE".equals(key)){
				refDicRes.setDdDescType((Integer)o);
			} else if("POPDICURL".equals(key)){
				refDicRes.setPopDicUrl((String)o);
			} else if("REMARK".equals(key)){
				refDicRes.setRemark((String)o);
			}
		}
		return refDicRes;
	}
	
	@Override
	public String tableName() {
		return "st_refdicres";
	}

	@Override
	public String keyProps() {
		return "SUBSYS,DICSUBKIND";
	}

}
